/*
 *   This program is free software: you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation, either version 3 of the License, or
 *   (at your option) any later version.
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

/**
  * Library of fast math functions. 
  * 
  * @author Waleed Kadous
  * @version $Id: FastMath.java,v 1.1.1.1 2002/06/28 07:36:16 waleed Exp $
  */

package tclass.util;   
import weka.core.Statistics;

// import VisualNumerics.math.*; 

public class FastMath {
    static final float min = -5; 
    static final float max = 5; 
    static final float interval = 0.01f; 
    static final float big_minus = -10000000; 
    public static final float ln2 = (float)  Math.log(2); 
    private final static int MAX_ITERATIONS = 150;
    private final static double EPS=2.22e-16;
    private final static double PRECISION = 4.0*EPS;
    private final static double XMININ=2.23e-308;
    private final static double logGamma_xBig=2.55e305;
    private final static double LOGSQRT2PI=Math.log(Math.sqrt(2*Math.PI));
    private static double logGammaCache_res=0.0;
    private static double logGammaCache_x=0.0;

    public static double logGamma(double x) {
        // Log Gamma related constants
        final double lg_d1 = -.5772156649015328605195174,
            lg_d2 = .4227843350984671393993777,
            lg_d4 = 1.791759469228055000094023;
        final double lg_p1[] = { 4.945235359296727046734888,
                                 201.8112620856775083915565,2290.838373831346393026739,
                                 11319.67205903380828685045,28557.24635671635335736389,
                                 38484.96228443793359990269,26377.48787624195437963534,
                                 7225.813979700288197698961 };
        final double lg_q1[] = { 67.48212550303777196073036,
                                 1113.332393857199323513008,7738.757056935398733233834,
                                 27639.87074403340708898585,54993.10206226157329794414,
                                 61611.22180066002127833352,36351.27591501940507276287,
                                 8785.536302431013170870835 };
        final double lg_p2[] = { 4.974607845568932035012064,
                                 542.4138599891070494101986,15506.93864978364947665077,
                                 184793.2904445632425417223,1088204.76946882876749847,
                                 3338152.967987029735917223,5106661.678927352456275255,
                                 3074109.054850539556250927 };
        final double lg_q2[] = { 183.0328399370592604055942,
                                 7765.049321445005871323047,133190.3827966074194402448,
                                 1136705.821321969608938755,5267964.117437946917577538,
                                 13467014.54311101692290052,17827365.30353274213975932,
                                 9533095.591844353613395747 };
        final double lg_p4[] = { 14745.02166059939948905062,
                                 2426813.369486704502836312,121475557.4045093227939592,
                                 2663432449.630976949898078,29403789566.34553899906876,
                                 170266573776.5398868392998,492612579337.743088758812,
                                 560625185622.3951465078242 };
        final double lg_q4[] = { 2690.530175870899333379843,
                                 639388.5654300092398984238,41355999.30241388052042842,
                                 1120872109.61614794137657,14886137286.78813811542398,
                                 101680358627.2438228077304,341747634550.7377132798597,
                                 446315818741.9713286462081 };
        final double lg_c[] = { -0.001910444077728,8.4171387781295e-4,
                                -5.952379913043012e-4,7.93650793500350248e-4,
                                -0.002777777777777681622553,0.08333333333333333331554247,
                                0.0057083835261 };
        //       Rough estimate of the fourth root of logGamma_xBig
        final double lg_frtbig = 2.25e76;

        final double pnt68 = 0.6796875;

        double xden, corr, xnum;
        int i;
        double y, xm1, xm2, xm4, res, ysq;

        if (x==logGammaCache_x)
            return logGammaCache_res;
        y = x;
        if (y > 0.0 && y <= logGamma_xBig) {
            if (y <= EPS) {
                res = -Math.log(y);
            } else if (y <= 1.5) {
                // ----------------------------------------------------------------------
                //  EPS .LT. X .LE. 1.5
                // ----------------------------------------------------------------------
                if (y < pnt68) {
                    corr = -Math.log(y);
                    xm1 = y;
                } else {
                    corr = 0.0;
                    xm1 = y - 1.0;
                }
                if (y <= 0.5 || y >= pnt68) {
                    xden = 1.0;
                    xnum = 0.0;
                    for (i = 0; i < 8; i++) {
                        xnum = xnum * xm1 + lg_p1[i];
                        xden = xden * xm1 + lg_q1[i];
                    }
                    res = corr + xm1 * (lg_d1 + xm1 * (xnum / xden));
                } else {
                    xm2 = y - 1.0;
                    xden = 1.0;
                    xnum = 0.0;
                    for (i = 0; i < 8; i++) {
                        xnum = xnum * xm2 + lg_p2[i];
                        xden = xden * xm2 + lg_q2[i];
                    }
                    res = corr + xm2 * (lg_d2 + xm2 * (xnum / xden));
                }
            } else if (y <= 4.0) {
                // ----------------------------------------------------------------------
                //  1.5 .LT. X .LE. 4.0
                // ----------------------------------------------------------------------
                xm2 = y - 2.0;
                xden = 1.0;
                xnum = 0.0;
                for (i = 0; i < 8; i++) {
                    xnum = xnum * xm2 + lg_p2[i];
                    xden = xden * xm2 + lg_q2[i];
                }
                res = xm2 * (lg_d2 + xm2 * (xnum / xden));
            } else if (y <= 12.0) {
                // ----------------------------------------------------------------------
                //  4.0 .LT. X .LE. 12.0
                // ----------------------------------------------------------------------
                xm4 = y - 4.0;
                xden = -1.0;
                xnum = 0.0;
                for (i = 0; i < 8; i++) {
                    xnum = xnum * xm4 + lg_p4[i];
                    xden = xden * xm4 + lg_q4[i];
                }
                res = lg_d4 + xm4 * (xnum / xden);
            } else {
                // ----------------------------------------------------------------------
                //  Evaluate for argument .GE. 12.0
                // ----------------------------------------------------------------------
                res = 0.0;
                if (y <= lg_frtbig) {
                    res = lg_c[6];
                    ysq = y * y;
                    for (i = 0; i < 6; i++)
                        res = res / ysq + lg_c[i];
                }
                res /= y;
                corr = Math.log(y);
                res = res + LOGSQRT2PI - 0.5 * corr;
                res += y * (corr - 1.0);
            }
        } else {
            // ----------------------------------------------------------------------
            //  Return for bad arguments
            // ----------------------------------------------------------------------
            res = Double.MAX_VALUE;
        }
        // ----------------------------------------------------------------------
        //  Final adjustments and return
        // ----------------------------------------------------------------------
        logGammaCache_x = x;
        logGammaCache_res = res;
        return res;
    }

    /**
     * Incomplete gamma function.
     * The computation is based on approximations presented in Numerical Recipes, Chapter 6.2 (W.H. Press et al, 1992).
     * @param a require a>=0
     * @param x require x>=0
     * @return 0 if x<0, a<=0 or a>2.55E305 to avoid errors and over/underflow
     */
    public static double incompleteGamma(double a, double x) {
	if (x <= 0.0 || a <= 0.0 || a > logGamma_xBig)
	    return 0.0;
	if (x < (a+1.0))
	    return gammaSeriesExpansion(a,x);
	else 
	    return 1.0-gammaFraction(a,x);
    }
    
    public static double lnChiSqProb(double chi2, int df){
	double x = chi2/2.0; 
	double a = df/2.0; 
	if (x <= 0.0 || a <= 0.0 || a > logGamma_xBig)
	    return 0.0;
	if (x < (a+1.0))
	    return Math.log(1-gammaSeriesExpansion(a,x));
	else 
	    return lnGammaFraction(a,x);
    }
    /**
     * @author Jaco van Kooten
     */
    private static double gammaSeriesExpansion(double a, double x) {
	double ap=a;
	double del=1.0/a;
	double sum = del;
	for (int n=1; n < MAX_ITERATIONS; n++) {
	    ++ap;
	    del *= x/ap;
	    sum += del;
	    if (del < sum*PRECISION)
		return sum*Math.exp(-x + a*Math.log(x) - logGamma(a));
	}
	return 0.0;
    }
    /**
     * @author Jaco van Kooten
     */
    private static double gammaFraction(double a, double x) {
	double b=x+1.0-a;
	double c=1.0/XMININ;
	double d=1.0/b;
	double h=d;
	double del=0.0;
	double an; 
	for (int i=1; i<MAX_ITERATIONS && Math.abs(del-1.0)>PRECISION; i++) {
	    an = -i*(i-a);
	    b += 2.0;
	    d=an*d+b;
	    c=b+an/c;
	    if (Math.abs(c) < XMININ)
		c=XMININ;
	    if (Math.abs(d) < XMININ)
		c=XMININ;
	    d=1.0/d;
	    del=d*c;
	    h *= del;
	}
	return Math.exp(-x + a*Math.log(x) - logGamma(a))*h;
    }
    private static double lnGammaFraction(double a, double x) {
	double b=x+1.0-a;
	double c=1.0/XMININ;
	double d=1.0/b;
	double h=d;
	double del=0.0;
	double an; 
	for (int i=1; i<MAX_ITERATIONS && Math.abs(del-1.0)>PRECISION; i++) {
	    an = -i*(i-a);
	    b += 2.0;
	    d=an*d+b;
	    c=b+an/c;
	    if (Math.abs(c) < XMININ)
		c=XMININ;
	    if (Math.abs(d) < XMININ)
		c=XMININ;
	    d=1.0/d;
	    del=d*c;
	    h *= del;
	}
	return -x + a*Math.log(x) - logGamma(a) + Math.log(h);
    }

    /** 
     * Returns the log of n choose k
     */
    
    public static float log2Choose(int n, int k){
        if(n==k) return 0; // log of (n choose n) = 0; 
        if(n == 0) return 0; 
        if(k == 0) return 0; 
        float retval = (float) logGamma(n) - (float) logGamma(k) - (float) logGamma(n-k); 
        retval = retval/ln2; 
        return retval; 
    }
    
    /**
     * Returns the normalCDF for the value; accurate to 10^-6 or so. 
     */
    public static float normalCDF(float val) {
        if(val < min){
            return (float) Statistics.normalProbability(val); 
        }
        if(val > max){
            return (float) Statistics.normalProbability(val); 
        }
        else {
            //Find array position: 
            float scaledVal = (val-min)/interval;
            int arrayIndex = (int) scaledVal; 
            float remainder = scaledVal - arrayIndex; 
            float lowerBnd = nCDFArray[arrayIndex]; 
            float upperBnd = nCDFArray[arrayIndex+1]; 
            return(lowerBnd + (upperBnd - lowerBnd)*remainder); 
        }
    }
    
    public static float logNormalCDF(float val) {
        if(val < min){
            return (float) Math.log(Statistics.normalProbability(val)); 
        }
        if(val > max){
            return (float) Math.log(Statistics.normalProbability(val)); 
        }
        else {
            //Find array position: 
            float scaledVal = (val-min)/interval;
            int arrayIndex = (int) scaledVal; 
            float remainder = scaledVal - arrayIndex; 
            float lowerBnd = nLCDFArray[arrayIndex]; 
            float upperBnd = nLCDFArray[arrayIndex+1]; 
            return(lowerBnd + (upperBnd - lowerBnd)*remainder); 
        }
    }
    
  
    public static void main(String args[]){
        for(float i=-4.955f; i < 5.1; i+= 0.1){
            System.out.println("In: " + i + " N: " + normalCDF(i) + " LN: " + logNormalCDF(i) + " Ex: " + Statistics.normalProbability(i) + " Err: " + Math.abs(normalCDF(i)-Statistics.normalProbability(i))); 
        }
        float maxErr = 0; 
        float maxErrPoint = 0; 
        for(float i = -4.995f; i < 5.1; i += 0.01){
            if(Math.abs(normalCDF(i)- Statistics.normalProbability(i)) > maxErr){
                maxErr = (float) Math.abs(normalCDF(i)- Statistics.normalProbability(i)); 
                maxErrPoint = i; 
            }
        }
        System.err.println("Max Error Point = " + maxErrPoint + " Max Error = " + maxErr); 
    }
    
    static final float nCDFArray[] = {
        2.866515718791934E-7f, 3.018964621715206E-7f, 3.179213654509154E-7f,
        3.3476450711587856E-7f, 3.5246589655419515E-7f, 3.710674058325394E-7f,
        3.906128516317548E-7f, 4.111480805510372E-7f, 4.3272105790841255E-7f,
        4.55381960169229E-7f, 4.791832711388164E-7f, 5.041798820600425E-7f,
        5.304291957611717E-7f, 5.579912350042749E-7f, 5.869287551894048E-7f,
        6.173073615748139E-7f, 6.49195631178801E-7f, 6.826652395340734E-7f,
        7.177910924711068E-7f, 7.546514631126327E-7f, 7.933281342672059E-7f,
        8.339065464158082E-7f, 8.764759514915567E-7f, 9.211295726589157E-7f,
        9.679647703052444E-7f, 1.0170832144641394E-6f, 1.0685910638968524E-6f,
        1.1225991520649828E-6f, 1.1792231802347991E-6f, 1.238583917960896E-6f,
        1.300807411204274E-6f, 1.3660251983477276E-6f, 1.4343745343791672E-6f,
        1.5059986235216042E-6f, 1.5810468605967448E-6f,
        1.6596750814174736E-6f, 1.7420458225132655E-6f,
        1.8283285905011901E-6f, 1.9187001414242804E-6f,
        2.0133447703882077E-6f, 2.112454611836565E-6f, 2.2162299508147E-6f,
        2.324879545581791E-6f, 2.438620961940885E-6f, 2.557680919666854E-6f,
        2.682295651422565E-6f, 2.812711274564298E-6f, 2.9491841762481335E-6f,
        3.091981412260259E-6f, 3.2413811200052373E-6f, 3.397672946097838E-6f,
        3.5611584890157243E-6f, 3.7321517572821486E-6f, 3.910979643659972E-6f,
        4.0979824158505285E-6f, 4.293514224203553E-6f, 4.497943626957144E-6f,
        4.711654133539426E-6f, 4.93504476647713E-6f, 5.1685306424694686E-6f,
        5.412543573199252E-6f, 5.667532686467238E-6f, 5.933965068249263E-6f,
        6.212326426290541E-6f, 6.5031217758652945E-6f, 6.806876148344881E-6f,
        7.124135323232339E-6f, 7.455466584336005E-6f, 7.801459500770616E-6f,
        8.162726733488658E-6f, 8.539904868061665E-6f, 8.93365527444557E-6f,
        9.344664994480821E-6f, 9.773647657893986E-6f, 1.0221344427583445E-5f,
        1.068852497498845E-5f, 1.1175988486357363E-5f, 1.1684564700747021E-5f,
        1.2215114980602643E-5f, 1.2768533415784225E-5f,
        1.3345747961922201E-5f, 1.3947721614002726E-5f,
        1.4575453616099798E-5f, 1.5229980708188631E-5f,
        1.5912378410992766E-5f, 1.662376234983364E-5f, 1.7365289618469893E-5f,
        1.8138160183931137E-5f, 1.894361833336725E-5f, 1.9782954163953555E-5f,
        2.065750511690864E-5f, 2.1568657556699246E-5f, 2.251784839652505E-5f,
        2.3506566771191853E-5f, 2.4536355758501522E-5f,
        2.5608814150302184E-5f, 2.672559827436046E-5f, 2.7888423868234892E-5f,
        2.909906800634576E-5f, 3.035937108145441E-5f, 3.167123884178135E-5f,
        3.3036644485008066E-5f, 3.44576308104261E-5f, 3.593631243051017E-5f,
        3.747487804320984E-5f, 3.9075592766269305E-5f, 4.074080053489903E-5f,
        4.247292656413995E-5f, 4.427447987727305E-5f, 4.614805590164292E-5f,
        4.809633913327755E-5f, 5.0122105871698614E-5f, 5.2228227026330666E-5f,
        5.441767099592988E-5f, 5.6693506622463423E-5f, 5.905890622088378E-5f,
        6.151714868625241E-5f, 6.407162267967406E-5f, 6.672582989451952E-5f,
        6.948338840441554E-5f, 7.234803609449349E-5f, 7.532363417739445E-5f,
        7.841417079553409E-5f, 8.162376471113726E-5f, 8.495666908555678E-5f,
        8.841727534939478E-5f, 9.201011716494704E-5f, 9.573987448249548E-5f,
        9.961137769197046E-5f, 1.0362961187151002E-4f, 1.077997211344361E-4f,
        1.1212701307617247E-4f, 1.1661696332261562E-4f,
        1.2127522018147847E-4f, 1.261076093981082E-4f, 1.311201390172805E-4f,
        1.3631900435245994E-4f, 1.4171059306400797E-4f, 1.473014903478087E-4f,
        1.5309848423576832E-4f, 1.5910857100963132E-4f, 1.653389607295399E-4f,
        1.7179708287874606E-4f, 1.7849059212586522E-4f,
        1.8542737420604148E-4f, 1.926155519223707E-4f, 2.000634912689029E-4f,
        2.077798076765222E-4f, 2.1577337238296642E-4f, 2.240533189282307E-4f,
        2.3262904977655905E-4f, 2.415102430661918E-4f, 2.507068594880101E-4f,
        2.6022914929417154E-4f, 2.700876594377959E-4f, 2.802932408447166E-4f,
        2.908570558182645E-4f, 3.017905855780139E-4f, 3.131056379333565E-4f,
        3.2481435509273417E-4f, 3.369292216092921E-4f, 3.494630724636683E-4f,
        3.624291012845704E-4f, 3.75840868707735E-4f, 3.897123108737897E-4f,
        4.040577480654865E-4f, 4.188918934846952E-4f, 4.342298621694782E-4f,
        4.5008718005148593E-4f, 4.664797931538536E-4f, 4.8342407692967355E-4f,
        5.009368457410586E-4f, 5.190353624787116E-4f, 5.377373483218347E-4f,
        5.570609926381167E-4f, 5.77024963023445E-4f, 5.976484154808959E-4f,
        6.189510047384393E-4f, 6.409528947047285E-4f, 6.636747690621793E-4f,
        6.871378419965105E-4f, 7.113638690617351E-4f, 7.363751581795213E-4f,
        7.621945807717139E-4f, 7.888455830246698E-4f, 8.163521972839656E-4f,
        8.447390535778864E-4f, 8.740313912679883E-4f, 9.042550708248808E-4f,
        9.35436585727263E-4f, 9.676030744820834E-4f, 0.001000782332763567f,
        0.0010350028256687095f, 0.0010702937000866837f,
        0.0011066847971794667f, 0.0011442066649708113f,
        0.0011828905710405944f, 0.0012227685153213285f,
        0.0012638732429935578f, 0.0013062382574766033f, 0.001349897833511044f,
        0.001394887030329072f, 0.0014412417049087568f, 0.0014889985253080354f,
        0.0015381949840740864f, 0.0015888694117235707f,
        0.0016410609902890421f, 0.0016948097669266255f, 0.001750156667579927f,
        0.0018071435106948835f, 0.001865813020980172f, 0.0019262088432074548f,
        0.0019883755560457443f, 0.0020523586859237976f, 0.002118204720914369f,
        0.0021859611246339036f, 0.002255676350151081f, 0.0023273998538974115f,
        0.0024011821095728638f, 0.0024770746220393897f,
        0.0025551299411948735f, 0.002635401675819976f, 0.002717944507390054f,
        0.002802814203844129f, 0.002890067633302767f, 0.0029797627777264244f,
        0.0030719587465056803f, 0.0031667157899745516f,
        0.0032640953128378904f, 0.0033641598875036754f, 0.003466973267310801f,
        0.0035726003996427555f, 0.0036811074389174235f, 0.003792561759443036f,
        0.0039070319681300736f, 0.004024587917048778f, 0.004145300715821715f,
        0.004269242743840696f, 0.00439648766229705f, 0.004527110426014245f,
        0.004661187295071549f, 0.0047987958462072655f, 0.00494001498398997f,
        0.005084924951745918f, 0.005233607342230721f, 0.00538614510803319f,
        0.005542622571699016f, 0.005703125435562015f, 0.005867740791270267f,
        0.006036557128994533f, 0.0062096643463060855f, 0.006387153756711076f,
        0.0065691180978282625f, 0.006755651539197026f, 0.006946849689702278f,
        0.007142809604602966f, 0.0073436297921505795f, 0.0075494102197841756f,
        0.007760252319888183f, 0.007976258995099298f, 0.008197534623148641f,
        0.008424185061225383f, 0.008656317649847808f, 0.008894041216227994f,
        0.009137466077116092f, 0.00938670404111016f, 0.009641868410417597f,
        0.009903073982054152f, 0.010170437048466454f, 0.010444075397564154f,
        0.010724108312147611f, 0.011010656568717272f, 0.011303842435650897f,
        0.011603789670734669f, 0.011910623518034597f, 0.012224470704094458f,
        0.012545459433446704f, 0.012873719383422976f, 0.013209381698250634f,
        0.013552578982422396f, 0.013903445293325729f, 0.014262116133119266f,
        0.014628728439843332f, 0.015003420577752138f, 0.015386332326855151f,
        0.015777604871655568f, 0.01617738078907372f, 0.01658580403554399f,
        0.01700301993327349f, 0.017429175155651358f, 0.017864417711797805f,
        0.01830889693024207f, 0.018762763441719135f, 0.019226169161074846f,
        0.019699267268270062f, 0.02018221218847414f, 0.02067515957123891f,
        0.02117826626874441f, 0.02169169031310802f, 0.022215590892749326f,
        0.022750128327803012f, 0.023295464044572757f, 0.0238517605490197f,
        0.024419181399279132f, 0.02499789117719972f, 0.025588055458900177f,
        0.02618984078433843f, 0.02680341462588931f, 0.0274289453559269f,
        0.028066602213408235f, 0.028716555269456066f, 0.029378975391938282f,
        0.030054034209042624f, 0.030741904071845714f, 0.03144275801587607f,
        0.032156769721671315f, 0.03288411347433063f, 0.03362496412206354f,
        0.034379497033737695f, 0.03514788805542802f, 0.035930313465970795f,
        0.0367269499315269f, 0.03753797445915868f, 0.03836356434942624f,
        0.039203897148009176f, 0.04005915059636033f, 0.04092950258139973f,
        0.04181513108425643f, 0.04271621412806745f, 0.04363292972484372f,
        0.04456545582141319f, 0.04551397024445244f, 0.04647865064461896f,
        0.04745967443979636f, 0.04845721875746629f, 0.04947146037622127f,
        0.05050257566643336f, 0.05155074053009414f, 0.0526161303398431f,
        0.05369891987720109f, 0.05479928327002737f, 0.05591739392921849f,
        0.057053424484669234f, 0.058207546720515445f, 0.05937993150968012f,
        0.060570748747744395f, 0.0617801672861661f, 0.06300835486486968f,
        0.06425547804423057f, 0.06552170213648f, 0.06680719113655516f,
        0.06811210765242118f, 0.06943661283489198f, 0.07078086630697784f,
        0.07214502609278792f, 0.07352924854601708f, 0.0749336882780469f,
        0.07635849808569105f, 0.0778038288786166f, 0.07926982960647305f,
        0.08075664718576098f, 0.08226442642647452f, 0.08379330995855017f,
        0.08534343815815709f, 0.08691494907386293f, 0.08850797835271218f,
        0.09012265916625084f, 0.0917591221365357f, 0.0934174952621647f,
        0.0950979038443655f, 0.0968004704131809f, 0.09852531465378883f,
        0.10027255333299645f, 0.10204230022594724f, 0.103834666043081f,
        0.1056497583573866f, 0.10748768153198718f, 0.10934853664810051f,
        0.11123242143341283f, 0.11313943019090938f, 0.11506965372820216f,
        0.11702317928739708f, 0.11900009047554189f, 0.1210004671956969f,
        0.12302438557867179f, 0.12507191791546907f, 0.12714313259047721f,
        0.1292380940154571f, 0.13135686256436135f, 0.13349949450903248f,
        0.13566604195581872f, 0.1378565527831523f, 0.14007107058013135f,
        0.1423096345861476f, 0.14457227963160113f, 0.1468590360797452f,
        0.14916992976970134f, 0.15150498196068668f, 0.1538642092774934f,
        0.1562476236572623f, 0.15865523229758938f, 0.1610870376060063f,
        0.16354303715087287f, 0.16602322361372185f, 0.16852758474309387f,
        0.17105610330989995f, 0.17360875706435014f, 0.17618551869448418f,
        0.1787863557863406f, 0.1814112307858003f, 0.18406010096213843f,
        0.18673291837332023f, 0.1894296298330731f, 0.19215017687976782f,
        0.19489449574714113f, 0.19766251733689078f, 0.20045416719317316f,
        0.20326936547903168f, 0.20610802695478714f, 0.20897006095841397f,
        0.21185537138793237f, 0.21476385668583925f, 0.21769540982560343f,
        0.22064991830024894f, 0.2236272641130485f, 0.22662732377034817f,
        0.22964996827654338f, 0.2326950631312263f, 0.23576246832852127f,
        0.23885203835862562f, 0.24196362221157103f, 0.24509706338322013f,
        0.24825219988351088f, 0.25142886424696126f, 0.2546268835454435f,
        0.25784607940323834f, 0.2610862680143766f, 0.2643472601622742f,
        0.2676288612416672f, 0.2709308712828489f, 0.27425308497821327f,
        0.27759529171110475f, 0.2809572755869743f, 0.28433881546684053f,
        0.2877396850030527f, 0.29115965267735067f, 0.29459848184121706f,
        0.2980559307585129f, 0.30153175265038945f, 0.30502569574246535f,
        0.308537503314258f, 0.3120669137508558f, 0.3156136605968173f,
        0.31917747261228135f, 0.32275807383127153f, 0.3263551836221755f,
        0.3299685167503795f, 0.33359778344303803f, 0.3372426894559535f,
        0.340902936142544f, 0.3445782205248728f, 0.34826823536671225f,
        0.35197266924861514f, 0.3556912066449632f, 0.3594235280029622f,
        0.3631693098235513f, 0.3669282247441944f, 0.3706999416235173f,
        0.37448412562775596f, 0.37828043831897845f, 0.3820885377450427f,
        0.3859080785312501f, 0.3897387119736547f, 0.3935800861339864f,
        0.3974318459361454f, 0.40129363326422374f, 0.40516508706200977f,
        0.40904584343392836f, 0.412935535747372f, 0.4168337947363727f,
        0.4207402486065679f, 0.4246545231414092f, 0.4285762418095651f,
        0.4325050258734646f, 0.43644049449893096f, 0.44038226486585214f,
        0.4443299522798346f, 0.44828317028478626f, 0.45224153077637325f,
        0.4562046441162955f, 0.4601721192473251f, 0.46414356380905036f,
        0.4681185842542687f, 0.4720967859659715f, 0.4760777733748615f,
        0.480061150077346f, 0.48404651895394607f, 0.48803348228806337f,
        0.49202164188504544f, 0.4960105991914895f, 0.4999999554147258f,
        0.5039893116424204f, 0.5079782689622384f, 0.511966428581506f,
        0.5159533919468134f, 0.5199387608634991f, 0.5239221376149527f,
        0.5279031250816805f, 0.5318813268600725f, 0.5358563473808117f,
        0.5398277920268664f, 0.5437952672510092f, 0.5477583806928005f,
        0.5517167412949818f, 0.5556699594192203f, 0.5596176469611464f,
        0.5635594174646298f, 0.5674948862352365f, 0.5714236704528113f,
        0.5753453892831317f, 0.5792596639885788f, 0.5831661180377703f,
        0.5870643772141052f, 0.5909540697231653f, 0.5948348262989251f,
        0.5987062803087171f, 0.6025680678569036f, 0.6064198278872087f,
        0.6102612022836573f, 0.6140918359700805f, 0.6179113770081374f,
        0.6217194766938083f, 0.6255157896523194f, 0.6292999739314508f,
        0.6330716910931912f, 0.636830606303695f, 0.6405763884215046f,
        0.6443087100839981f, 0.6480272477920278f, 0.6517316819927101f,
        0.655421697160336f, 0.6590969818753656f, 0.6627572289014767f,
        0.6664021352606369f, 0.6700314023061662f, 0.6736447357937685f,
        0.6772418459504969f, 0.6808224475416359f, 0.6843862599354695f,
        0.6879330071659163f, 0.6914624179930088f, 0.694974225961198f,
        0.6984681694554635f, 0.7019439917552127f, 0.705401441085953f,
        0.7088402706687238f, 0.7122602387672727f, 0.7156611087329681f,
        0.7190426490474346f, 0.7224046333629058f, 0.7257468405402833f,
        0.7290690546849004f, 0.7323710651799833f, 0.7356526667178068f,
        0.7389136593285448f, 0.7421538484068131f, 0.7453730447359069f,
        0.7485710645097359f, 0.7517477293524591f, 0.754902866335827f,
        0.7580363079942353f, 0.7611478923374994f, 0.7642374628613591f,
        0.7673048685557233f, 0.7703499639106666f, 0.7733726089201898f,
        0.7763726690837621f, 0.7793500154056563f, 0.7823045243920954f,
        0.7852360780462291f, 0.7881445638609588f, 0.7910298748096313f,
        0.7938919093346211f, 0.7967305713338266f, 0.7995457701451011f,
        0.8023374205286442f, 0.8051054426473789f, 0.8078497620453415f,
        0.8105703096241103f, 0.813267021617303f, 0.8159398395631725f,
        0.8185887102753283f, 0.821213585811619f, 0.8238144234412034f,
        0.8263911856098473f, 0.8289438399034746f, 0.8314723590100116f,
        0.8339767206795556f, 0.8364569076829059f, 0.8389129077684923f,
        0.8413447136177379f, 0.8437523227988937f, 0.8461357377193838f,
        0.8484949655766976f, 0.8508300183078706f, 0.8531409125375911f,
        0.8554276695249727f, 0.8576903151090355f, 0.8599288796529322f,
        0.8621433979869637f, 0.8643339093504239f, 0.8665004573323143f,
        0.8686430898109717f, 0.8707618588926511f, 0.8728568208491021f,
        0.8749280360541866f, 0.8769755689195757f, 0.8789994878295702f,
        0.8809998650750859f, 0.882976776786847f, 0.8849303028678308f,
        0.8868605269250028f, 0.8887675362003885f, 0.8906514215015209f,
        0.8925122771313079f, 0.89435020081736f, 0.8961652936408209f,
        0.8979576599647412f, 0.8997274073620385f, 0.9014746465430836f,
        0.9031994912829524f, 0.9049020583483858f, 0.9065824674244973f,
        0.908240841041267f, 0.9098773044998615f, 0.9114919857988191f,
        0.9130850155601389f, 0.9146565269553109f, 0.9162066556313248f,
        0.9177355396366955f, 0.9192433193475411f, 0.9207301373937483f,
        0.9221961385852634f, 0.9236414698385409f, 0.9250662801031855f,
        0.9264707202888213f, 0.9278549431922206f, 0.9292191034247252f,
        0.930563357339992f, 0.9318878629620934f, 0.9331927799140048f,
        0.9344782693465069f, 0.9357444938675329f, 0.9369916174719897f,
        0.9382198054720801f, 0.9394292244281522f, 0.940620042080105f,
        0.9417924272793721f, 0.9429465499215121f, 0.9440825808794269f,
        0.9452006919372327f, 0.946301055724806f, 0.9473838456530269f,
        0.9484492358497392f, 0.9494974010964496f, 0.9505285167657854f,
        0.9515427587597269f, 0.9525403034486365f, 0.953521327611098f,
        0.9544860083745861f, 0.9554345231569785f, 0.9563670496089282f,
        0.9572837655571084f, 0.9581848489483449f, 0.9590704777946479f,
        0.9599408301191549f, 0.9607960839029961f, 0.9616364170330945f,
        0.9624620072509068f, 0.9632730321021175f, 0.9640696688872924f,
        0.9648520946135013f, 0.9656204859469131f, 0.9663750191663733f,
        0.967115870117967f, 0.9678432141705728f, 0.9685572261724126f,
        0.9692580804085985f, 0.9699459505596822f, 0.970621009661207f,
        0.9712834300642652f, 0.9719333833970613f, 0.9725710405274803f,
        0.9731965715266635f, 0.9738101456335868f, 0.9744119312206438f,
        0.9750020957602302f, 0.9755808057923249f, 0.9761482268930683f,
        0.9767045236443321f, 0.9772498596042745f, 0.9777843972788804f,
        0.9783082980944782f, 0.9788217223712273f, 0.979324829297573f,
        0.9798177769056589f, 0.9803007220476914f, 0.9807738203732497f,
        0.9812372263075305f, 0.981691093030523f, 0.9821355724571015f,
        0.9825708152180297f, 0.9829969706418662f, 0.983414186737761f,
        0.9838226101791332f, 0.9842223862882203f, 0.9846136590214873f,
        0.9849965709558858f, 0.9853712632759498f, 0.9857378757617206f,
        0.986096546777484f, 0.9864474132613125f, 0.9867906107153968f,
        0.9871262731971567f, 0.9874545333111178f, 0.9877755222015397f,
        0.9880893695457873f, 0.9883962035484257f, 0.9886961509360321f,
        0.9889893369527055f, 0.9892758853562653f, 0.9895559184151227f,
        0.9898295569058114f, 0.9900969201111653f, 0.9903581258191274f,
        0.9906132903221777f, 0.9908625284173656f, 0.9911059534069315f,
        0.9913436770995071f, 0.9915758098118759f, 0.9918024603712832f,
        0.9920237361182803f, 0.9922397429100897f, 0.9924505851244755f,
        0.9926563656641072f, 0.9928571859614022f, 0.9930531459838321f,
        0.9932443442396811f, 0.9934308777842403f, 0.9936128422264271f,
        0.9937903317358129f, 0.9939634390500484f, 0.9941322554826713f,
        0.9942968709312847f, 0.9944573738860906f, 0.9946138514387681f,
        0.9947663892916823f, 0.9949150717674092f, 0.9950599818185686f,
        0.995201201037946f, 0.9953388096688978f, 0.9954728866160224f,
        0.9956035094560878f, 0.9957307544492023f, 0.9958546965502186f,
        0.9959754094203569f, 0.9960929654390372f, 0.9962074357159106f,
        0.9963188901030753f, 0.9964273972074693f, 0.9965330244034284f,
        0.9966358378453974f, 0.9967359024807869f, 0.9968332820629622f,
        0.9969280391643575f, 0.9970202351897036f, 0.9971099303893602f,
        0.9971971838727434f, 0.9972820536218383f, 0.9973645965047906f,
        0.9974448682895635f, 0.9975229236576567f, 0.9975988162178745f,
        0.9976725985201383f, 0.9977443220693335f, 0.9978140373391827f,
        0.9978817937861402f, 0.9979476398632967f, 0.9980116230342908f,
        0.9980737897872168f, 0.9981341856485249f, 0.998192855196905f,
        0.9982498420771497f, 0.9983051890139879f, 0.9983589378258856f,
        0.9984111294388064f, 0.9984618038999258f, 0.9985110003912955f,
        0.9985587572434511f, 0.9986051119489583f, 0.9986501011758935f,
        0.9986937607812525f, 0.9987361258242853f, 0.9987772305797499f,
        0.9988171085510826f, 0.9988557924834808f, 0.9988933143768937f,
        0.998929705498917f, 0.9989649963975908f, 0.9989992169140925f,
        0.9990323961953268f, 0.9990645627064056f, 0.9990957442430183f,
        0.9991259679436859f, 0.9991552603019018f, 0.9991836471781504f,
        0.9992111538118073f, 0.9992378048329138f, 0.9992636242738291f,
        0.9992886355807523f, 0.9993128616251181f, 0.9993363247148607f,
        0.9993590466055461f, 0.9993810485113722f, 0.999402351116033f,
        0.9994229745834489f, 0.9994429385683589f, 0.9994622622267771f,
        0.9994809642263104f, 0.9994990627563368f, 0.9995165755380461f,
        0.9995335198343389f, 0.9995499124595875f, 0.9995657697892545f,
        0.9995811077693726f, 0.9995959419258826f, 0.999610287373832f,
        0.9996241588264312f, 0.9996375706039716f, 0.9996505366426027f,
        0.9996630705029682f, 0.999675185378705f, 0.9996868941048017f,
        0.9996982091658192f, 0.9997091427039735f, 0.9997197065270813f,
        0.9997299121163694f, 0.9997397706341483f, 0.9997492929313505f,
        0.9997584895549361f, 0.9997673707551636f, 0.9997759464927304f,
        0.9997842264457808f, 0.9997922200167854f, 0.9997999363392899f,
        0.9998073842845379f, 0.9998145724679659f, 0.9998215092555736f,
        0.9998282027701691f, 0.9998346608974933f, 0.9998408912922195f,
        0.9998469013838363f, 0.9998526983824082f, 0.999858289284222f,
        0.9998636808773141f, 0.9998688797468849f, 0.999873892280599f,
        0.9998787246737743f, 0.9998833829344596f, 0.9998878728884042f,
        0.9998922001839198f, 0.999896370296636f, 0.9999003885341522f,
        0.9999042600405851f, 0.9999079898010163f, 0.9999115826458393f,
        0.9999150432550077f, 0.9999183761621868f, 0.9999215857588106f,
        0.9999246762980434f, 0.9999276518986503f, 0.9999305165487766f,
        0.999933274109638f, 0.999935928319122f, 0.9999384827953051f,
        0.9999409410398831f, 0.9999433064415196f, 0.9999455822791122f,
        0.9999477717249782f, 0.9999498778479617f, 0.9999519036164638f,
        0.9999538519013959f, 0.9999557254790598f, 0.9999575270339534f,
        0.9999592591615061f, 0.999960924370743f, 0.9999625250868812f,
        0.9999640636538574f, 0.9999655423367912f, 0.9999669633243824f,
        0.9999683287312449f, 0.9999696406001795f, 0.9999709009043857f,
        0.9999721115496129f, 0.9999732743762555f, 0.9999743911613893f,
        0.9999754636207531f, 0.9999764934106761f, 0.9999774821299513f,
        0.9999784313216578f, 0.9999793424749316f, 0.9999802170266869f,
        0.9999810563632895f, 0.9999818618221816f, 0.9999826346934614f,
        0.999983376221417f, 0.9999840876060165f, 0.9999847700043546f,
        0.9999854245320574f, 0.9999860522646468f, 0.9999866542388632f,
        0.999987231453952f, 0.9999877848729085f, 0.9999883154236894f,
        0.9999888240003851f, 0.9999893114643591f, 0.9999897786453508f,
        0.9999902263425473f, 0.9999906553256206f, 0.9999910663357343f,
        0.9999914600865186f, 0.9999918372650162f, 0.9999921985325974f,
        0.9999925445258482f, 0.9999928758574304f, 0.9999931931169134f,
        0.9999934968715816f, 0.9999937876672148f, 0.999994066028845f,
        0.999994332461488f, 0.9999945874508517f, 0.9999948314640227f,
        0.9999950649501291f, 0.999995288340983f, 0.9999955020517014f,
        0.9999957064813073f, 0.9999959020133103f, 0.9999960890162691f,
        0.9999962678443344f, 0.9999964388377741f, 0.9999966023234813f,
        0.9999967586154648f, 0.9999969080153233f, 0.9999970508127036f,
        0.9999971872857437f, 0.9999973177014994f, 0.9999974423163579f,
        0.9999975613764371f, 0.9999976751179699f, 0.9999977837676759f,
        0.9999978875431215f, 0.9999979866530649f, 0.9999980812977916f,
        0.9999981716694359f, 0.9999982579522932f, 0.9999983403231198f,
        0.9999984189514225f, 0.9999984939997378f, 0.9999985656239019f,
        0.9999986339733095f, 0.999998699191165f, 0.9999987614147237f,
        0.999998820775524f, 0.999998877399612f, 0.9999989314077573f,
        0.9999989829156614f, 0.9999990320341577f, 0.9999990788694052f,
        0.9999991235230741f, 0.9999991660925247f, 0.9999992066709803f,
        0.999999245347693f, 0.9999992822081033f, 0.9999993173339942f,
        0.9999993508036387f, 0.9999993826919428f, 0.9999994130705822f,
        0.9999994420081338f, 0.999999469570203f, 0.9999994958195454f,
        0.9999995208161837f, 0.9999995446175207f, 0.999999567278448f,
        0.999999588851449f, 0.9999996093867006f, 0.999999628932168f,
        0.9999996475336979f, 0.999999665235107f, 0.9999996820782674f,
        0.9999996981031885f, 0.9999997133480958f, 0.9999997133484281f};

    static final float nLCDFArray[] = { -15.064998393988727f,
                                        -15.013181718846432f, -14.961461763200834f, -14.90983851614947f,
                                        -14.858311966738402f, -14.806882103961879f, -14.755548916762063f,
                                        -14.7043123940287f, -14.653172524598808f, -14.602129297256358f,
                                        -14.551182700731967f, -14.500332723702565f, -14.449579354791078f,
                                        -14.398922582566113f, -14.34836239554161f, -14.297898782176532f,
                                        -14.24753173087452f, -14.197261229983567f, -14.147087267795683f,
                                        -14.097009832546547f, -14.047028912415172f, -13.99714449552356f,
                                        -13.947356569936359f, -13.897665123660506f, -13.848070144644888f,
                                        -13.798571620779978f, -13.749169539897485f, -13.699863889769986f,
                                        -13.650654658110586f, -13.601541832572524f, -13.552525400748836f,
                                        -13.50360535017196f, -13.454781668313386f, -13.40605434258327f,
                                        -13.357423360330053f, -13.308888708840097f, -13.260450375337289f,
                                        -13.212108346982653f, -13.163862610873974f, -13.1157131540454f,
                                        -13.067659963467053f, -13.01970302604462f, -12.97184232861897f,
                                        -12.924077857965743f, -12.87640960079494f, -12.828837543750526f,
                                        -12.781361673410006f, -12.733981976284028f, -12.686698438815945f,
                                        -12.639511047381411f, -12.59241978828795f, -12.54542464777453f,
                                        -12.498525612011138f, -12.45172266709834f, -12.405015799066843f,
                                        -12.358404993877079f, -12.311890237418728f, -12.2654715155103f,
                                        -12.21914881389867f, -12.172922118258635f, -12.126791414192459f,
                                        -12.080756687229398f, -12.034817922825262f, -11.988975106361934f,
                                        -11.943228223146901f, -11.897577258412792f, -11.852022197316884f,
                                        -11.80656302494065f, -11.761199726289234f, -11.715932286291014f,
                                        -11.670760689797074f, -11.625684921580726f, -11.580704966337011f,
                                        -11.535820808682194f, -11.49103243315326f, -11.446339824207412f,
                                        -11.401742966221546f, -11.357241843491744f, -11.312836440232754f,
                                        -11.268526740577457f, -11.224312728576347f, -11.180194388197f,
                                        -11.136171703323532f, -11.09224465775606f, -11.04841323521016f,
                                        -11.004677419316321f, -10.961037193619388f, -10.917492541578008f,
                                        -10.87404344656407f, -10.830689891862137f, -10.787431860668882f,
                                        -10.744269336092511f, -10.701202301152183f, -10.658230738777434f,
                                        -10.61535463180759f, -10.572573962991168f, -10.52988871498529f,
                                        -10.487298870355078f, -10.444804411573053f, -10.402405321018525f,
                                        -10.360101580976973f, -10.317893173639437f, -10.275780081101889f,
                                        -10.233762285364607f, -10.191839768331546f, -10.15001251180969f,
                                        -10.108280497508424f, -10.066643707038875f, -10.025102121913266f,
                                        -9.983655723544263f, -9.942304493244302f, -9.901048412224933f,
                                        -9.859887461596141f, -9.81882162236567f, -9.777850875438348f,
                                        -9.736975201615389f, -9.6961945815937f, -9.655508995965196f,
                                        -9.614918425216082f, -9.574422849726153f, -9.534022249768075f,
                                        -9.493716605506668f, -9.453505896998179f, -9.41339010418955f,
                                        -9.373369206917683f, -9.3334431849087f, -9.293612017777194f,
                                        -9.253875685025468f, -9.214234166042786f, -9.174687440104602f,
                                        -9.135235486371794f, -9.095878283889872f, -9.056615811588212f,
                                        -9.017448048279263f, -8.978374972657745f, -8.93939656329985f,
                                        -8.900512798662435f, -8.861723657082212f, -8.82302911677492f,
                                        -8.784429155834504f, -8.745923752232276f, -8.707512883816086f,
                                        -8.669196528309463f, -8.630974663310772f, -8.59284726629235f,
                                        -8.554814314599643f, -8.516875785450326f, -8.479031655933433f,
                                        -8.441281903008464f, -8.4036265035045f, -8.366065434119289f,
                                        -8.328598671418348f, -8.291226191834053f, -8.253947971664706f,
                                        -8.216763987073612f, -8.179674214088143f, -8.1426786285988f,
                                        -8.10577720635825f, -8.068969922980376f, -8.032256753939315f,
                                        -7.995637674568473f, -7.959112660059557f, -7.922681685461582f,
                                        -7.886344725679866f, -7.8501017554750385f, -7.813952749462026f,
                                        -7.777897682109026f, -7.7419365277364856f, -7.706069260516063f,
                                        -7.670295854469582f, -7.634616283467982f, -7.599030521230258f,
                                        -7.563538541322392f, -7.528140317156269f, -7.492835821988604f,
                                        -7.4576250289198365f, -7.422507910893032f, -7.3874844406927735f,
                                        -7.352554590944032f, -7.317718334111049f, -7.282975642496192f,
                                        -7.248326488238806f, -7.213770843314065f, -7.179308679531798f,
                                        -7.144939968535319f, -7.110664681800248f, -7.07648279063331f,
                                        -7.042394266171136f, -7.0083990793790525f, -6.9744972010498625f,
                                        -6.9406886018026075f, -6.9069732520813325f, -6.873351122153836f,
                                        -6.839822182110408f, -6.8063864018625555f, -6.773043751141732f,
                                        -6.739794199498038f, -6.70663771629893f, -6.673574270727897f,
                                        -6.640603831783154f, -6.607726368276298f, -6.574941848830973f,
                                        -6.5422502418815185f, -6.509651515671598f, -6.477145638252836f,
                                        -6.444732577483424f, -6.4124123010267295f, -6.380184776349891f,
                                        -6.348049970722391f, -6.316007851214644f, -6.284058384696531f,
                                        -6.252201537835976f, -6.220437277097461f, -6.188765568740562f,
                                        -6.157186378818463f, -6.125699673176452f, -6.0943054174504185f,
                                        -6.063003577065323f, -6.031794117233672f, -6.000677002953969f,
                                        -5.969652199009156f, -5.938719669965043f, -5.907879380168727f,
                                        -5.877131293746995f, -5.846475374604722f, -5.815911586423244f,
                                        -5.7854398926587285f, -5.755060256540529f, -5.724772641069525f,
                                        -5.694577009016456f, -5.664473322920227f, -5.634461545086216f,
                                        -5.6045416375845685f, -5.574713562248462f, -5.544977280672375f,
                                        -5.515332754210335f, -5.48577994397415f, -5.4563188108316325f,
                                        -5.426949315404801f, -5.397671418068084f, -5.3684850789464855f,
                                        -5.3393902579137595f, -5.310386914590556f, -5.281475008342557f,
                                        -5.252654498278601f, -5.2239253432487835f, -5.195287501842557f,
                                        -5.166740932386802f, -5.138285592943895f, -5.109921441309748f,
                                        -5.081648435011849f, -5.053466531307275f, -5.025375687180693f,
                                        -4.9973758593423465f, -4.969467004226029f, -4.941649077987036f,
                                        -4.9139220365001055f, -4.886285835357341f, -4.858740429866117f,
                                        -4.831285775046977f, -4.8039218256315f, -4.776648536060165f,
                                        -4.74946586048019f, -4.722373752743363f, -4.695372166403846f,
                                        -4.668461054715971f, -4.641640370632014f, -4.614910066799953f,
                                        -4.588270095561216f, -4.561720408948395f, -4.535260958682963f,
                                        -4.508891696172963f, -4.482612572510672f, -4.456423538470267f,
                                        -4.430324544505456f, -4.404315540747101f, -4.378396477000815f,
                                        -4.352567302744551f, -4.326827967126162f, -4.301178418960956f,
                                        -4.275618606729218f, -4.250148478573722f, -4.2247679822972275f,
                                        -4.1994770653599485f, -4.174275674877008f, -4.1491637576158755f,
                                        -4.124141259993787f, -4.099208128075136f, -4.074364307568859f,
                                        -4.0496097438257905f, -4.024944381836005f, -4.000368166226138f,
                                        -3.9758810412566845f, -3.9514829508192855f, -3.9271738384339847f,
                                        -3.9029536472464743f, -3.8788223200253147f, -3.8547797991591355f,
                                        -3.830826026653822f, -3.806960944129672f, -3.783184492818537f,
                                        -3.7594966135609473f, -3.7358972468032094f, -3.7123863325944857f,
                                        -3.6889638105838545f, -3.6656296200173473f, -3.642383699734969f,
                                        -3.6192259881676905f, -3.596156423334426f, -3.5731749428389885f,
                                        -3.550281483867022f, -3.5274759831829137f, -3.504758377126684f,
                                        -3.482128601610857f, -3.4595865921173075f, -3.4371322836940874f,
                                        -3.4147656109522293f, -3.392486508062531f, -3.370294908752316f,
                                        -3.3481907463021723f, -3.326173953542671f, -3.3042444628510603f,
                                        -3.2824022061479408f, -3.260647114893915f, -3.238979120086216f,
                                        -3.2173981522553206f, -3.1959041414615252f, -3.1744970172915163f,
                                        -3.153176708854907f, -3.1319431447807555f, -3.1107962532140623f,
                                        -3.0897359618122433f, -3.0687621977415773f, -3.04787488767364f,
                                        -3.0270739577817074f, -3.0063593337371386f, -2.9857309407057366f,
                                        -2.965188703344091f, -2.944732545795888f, -2.9243623916882093f,
                                        -2.9040781641277973f, -2.8838797856973097f, -2.8637671784515417f,
                                        -2.84374026391363f, -2.823798963071235f, -2.8039431963726966f,
                                        -2.784172883723174f, -2.7644879444807553f, -2.744888297452551f,
                                        -2.725373860890764f, -2.7059445524887327f, -2.686600289376959f,
                                        -2.667340988119109f, -2.648166564707991f, -2.6290769345615175f,
                                        -2.610072012518638f, -2.5911517128352535f, -2.5723159491801115f,
                                        -2.5535646346306735f, -2.5348976816689635f, -2.5163150021774f,
                                        -2.4978165074345955f, -2.4794021081111466f, -2.461071714265392f,
                                        -2.442825235339163f, -2.4246625801534956f, -2.4065836569043375f,
                                        -2.3885883731582274f, -2.370676635847951f, -2.352848351268186f,
                                        -2.335103425071115f, -2.31744176226203f, -2.2998632671949095f,
                                        -2.28236784356798f, -2.2649553944192555f, -2.2476258221220564f,
                                        -2.2303790283805203f, -2.2132149142250763f, -2.1961333800079177f,
                                        -2.1791343253984468f, -2.1622176493787055f, -2.145383250238786f,
                                        -2.128631025572225f, -2.111960872271388f, -2.09537268652282f,
                                        -2.0788663638025975f, -2.062441798871656f, -2.0460988857710998f,
                                        -2.029837517817505f, -2.0136575875981966f, -1.9975589869665187f,
                                        -1.9815416070370904f, -1.965605338181042f, -1.9497500700212431f,
                                        -1.9339756914275168f, -1.91828209051184f, -1.9026691546235326f,
                                        -1.8871367703444326f, -1.871684823484066f, -1.8563131990747992f,
                                        -1.8410217813669865f, -1.825810453824102f, -1.8106790991178712f,
                                        -1.7956275991233852f, -1.780655834914212f, -1.7657636867574997f,
                                        -1.7509510341090713f, -1.736217755608515f, -1.7215637290742687f,
                                        -1.7069888314986972f, -1.6924929390431707f, -1.6780759270331327f,
                                        -1.6637376699531705f, -1.6494780414420809f, -1.6352969142879359f,
                                        -1.6211941604231466f, -1.6071696509195255f, -1.5932232559833561f,
                                        -1.5793548449504557f, -1.5655642862812484f, -1.5518514475558345f,
                                        -1.538216195469069f, -1.5246583958256448f, -1.511177913535179f,
                                        -1.4977746126073088f, -1.4844483561467932f, -1.4711990063486269f,
                                        -1.4580264244931593f, -1.4449304709412283f, -1.4319110051293023f,
                                        -1.4189678855646397f, -1.406100969820458f, -1.39331011453112f,
                                        -1.3805951753873351f, -1.3679560071313794f, -1.355392463552333f,
                                        -1.3429043974813357f, -1.3304916607868678f, -1.318154104370047f,
                                        -1.3058915781599536f, -1.2937039311089769f, -1.2815910111881894f,
                                        -1.2695526653827471f, -1.257588739687319f, -1.2456990791015454f,
                                        -1.2338835276255284f, -1.2221419282553543f, -1.2104741229786509f,
                                        -1.1988799527701797f, -1.1873592575874652f, -1.175911876366463f,
                                        -1.1645376470172673f, -1.1532364064198615f, -1.1420079904199103f,
                                        -1.1308522338245974f, -1.1197689703985094f, -1.1087580328595705f,
                                        -1.0978192528750208f, -1.0869524610574526f, -1.076157486960897f,
                                        -1.0654341590769656f, -1.0547823048310492f, -1.044201750578576f,
                                        -1.033692321601329f, -1.0232538421038266f, -1.0128861352097682f,
                                        -1.0025890229585435f, -0.9923623263018121f, -0.9822058651001536f,
                                        -0.9721194581197878f, -0.9621029230293702f, -0.9521560763968635f,
                                        -0.9422787336864876f, -0.9324707092557496f, -0.922731816352556f,
                                        -0.9130618671124103f, -0.9034606725556962f, -0.8939280425850512f,
                                        -0.8844637859828296f, -0.8750677104086609f, -0.8657396223971018f,
                                        -0.8564793273553879f, -0.8472866295612843f, -0.8381613321610395f,
                                        -0.8291032371674442f, -0.8201121454579966f, -0.8111878567731792f,
                                        -0.802330169714844f, -0.7935388817447175f, -0.7848137891830175f,
                                        -0.7761546872071919f, -0.7675613698507795f, -0.759033630002394f,
                                        -0.7505712594048357f, -0.7421740486543319f, -0.7338417871999101f,
                                        -0.7255742633429049f, -0.7173712642366022f, -0.7092325758860232f,
                                        -0.7011579831478502f, -0.6931472697304977f, -0.6852002181943309f,
                                        -0.6773166099520331f, -0.6694962252691279f, -0.6617388432646547f,
                                        -0.6540442419120028f, -0.6464121980399067f, -0.6388424873336036f,
                                        -0.6313348843361576f, -0.6238891624499515f, -0.6165050939383517f,
                                        -0.6091824499275432f, -0.6019210004085458f, -0.5947205142394049f,
                                        -0.5875807591475675f, -0.5805015017324404f, -0.5734825074681366f,
                                        -0.5665235407064099f, -0.5596243646797832f, -0.5527847415048707f,
                                        -0.5460044321858976f, -0.5392831966184191f, -0.5326207935932432f,
                                        -0.5260169808005575f, -0.5194715148342628f, -0.5129841511965174f,
                                        -0.5065546443024947f, -0.5001827474853527f, -0.49386821300142464f,
                                        -0.48761079203562485f, -0.4814102347070793f, -0.47526629007498f,
                                        -0.469178706144665f, -0.46314722987392704f, -0.45717160717955346f,
                                        -0.4512515829440989f, -0.44538690102289297f, -0.43957730425128505f,
                                        -0.4338225344521281f, -0.4281223324435034f, -0.4224764380466884f,
                                        -0.4168845900943696f, -0.4113465264391016f, -0.4058619839620131f,
                                        -0.400430698581767f, -0.3950524052637659f, -0.3897268380296172f,
                                        -0.3844537299668468f, -0.37923281323887303f, -0.3740638190952357f,
                                        -0.36894647788208423f, -0.36388051905292523f, -0.3588656711796305f,
                                        -0.35390166196370787f, -0.34898821824783355f, -0.34412506602764775f,
                                        -0.339311930463816f, -0.33454853589435407f, -0.329834605847218f,
                                        -0.32516986305316115f, -0.3205540294588568f, -0.3159868262402871f,
                                        -0.31146797381639857f, -0.30699719186302515f, -0.30257419932707635f,
                                        -0.29819871444099294f, -0.2938704547374686f, -0.2895891370644367f,
                                        -0.2853544776003228f, -0.2811661918695618f, -0.2770239947583782f,
                                        -0.27292760053083015f, -0.26887672284511505f, -0.26487107477013516f,
                                        -0.2609103688023238f, -0.25699431688273017f, -0.25312263041435823f,
                                        -0.2492950202797631f, -0.2455111968588994f, -0.2417708700472217f,
                                        -0.2380737492740325f, -0.234419543521078f, -0.23080796134138973f,
                                        -0.22723871087836583f, -0.22371149988509387f, -0.22022603574390864f,
                                        -0.2167820254861855f, -0.2133791758123625f, -0.21001719311219166f,
                                        -0.20669578348521334f, -0.20341465276145093f, -0.20017350652232396f,
                                        -0.19697205012177238f, -0.19380998870759178f, -0.1906870272429719f,
                                        -0.18760287052823763f, -0.18455722322278537f, -0.1815497898672111f,
                                        -0.17858027490562667f, -0.1756483827081569f, -0.1727538175936149f,
                                        -0.16989628385234987f, -0.16707548576926012f, -0.16429112764696968f,
                                        -0.1615429138291586f, -0.1588305487240452f, -0.15615373682801137f,
                                        -0.15351218274936665f, -0.15090559123224406f, -0.14833366718062238f,
                                        -0.14579611568246711f, -0.14329264203398512f, -0.14082295176398532f,
                                        -0.13838675065833747f, -0.13598374478452638f, -0.13361364051628882f,
                                        -0.13127614455833f, -0.12897096397111144f, -0.12669780619570153f,
                                        -0.12445637907868404f, -0.12224639089711267f, -0.12006755038350896f,
                                        -0.1179195667508921f, -0.11580214971783442f, -0.11371500953353371f,
                                        -0.11165785700289509f, -0.10963040351161414f, -0.10763236105125241f,
                                        -0.10566344224429819f, -0.10372336036920185f, -0.1018118293853815f,
                                        -0.09992856395818603f, -0.09807327948380923f, -0.09624569211414652f,
                                        -0.09444551878158498f, -0.09267247722371867f, -0.09092628600797935f,
                                        -0.08920666455617543f, -0.08751333316892956f, -0.08584601305000596f,
                                        -0.08420442633051889f, -0.08258829609301435f, -0.08099734639541438f,
                                        -0.07943130229481708f, -0.07788988987114304f, -0.07637283625061836f,
                                        -0.07487986962908721f, -0.07341071929514442f, -0.07196511565307931f,
                                        -0.0705427902456228f, -0.06914347577648869f, -0.06776690613270131f,
                                        -0.06641281640670021f, -0.06508094291821451f, -0.0637710232358976f,
                                        -0.06248279619871598f, -0.06121600193708135f, -0.05997038189372026f,
                                        -0.05874567884427253f, -0.05754163691761055f, -0.056358001615872434f,
                                        -0.055194519834200546f, -0.0540509398801788f, -0.05292701149296112f,
                                        -0.051822485862084135f, -0.05073711564595619f, -0.04967065499001751f,
                                        -0.04862285954456297f, -0.047593486482222676f, -0.046582294515091875f,
                                        -0.045589043911506456f, -0.04461349651245599f, -0.043655415747629274f,
                                        -0.04271456665108706f, -0.0417907158765552f, -0.040883631712334834f,
                                        -0.039993084095822765f, -0.039118844627637414f, -0.03826068658534743f,
                                        -0.03741838493679553f, -0.03659171635301623f, -0.03578045922074053f,
                                        -0.03498439365448682f, -0.03420330150823157f, -0.03343696638665826f,
                                        -0.03268517365598069f, -0.031947710454337336f, -0.031224365701754755f,
                                        -0.030514930109677707f, -0.029819196190062916f,
                                        -0.029136958264034594f, -0.02846801247010072f, -0.02781215677192824f,
                                        -0.027169190965674946f, -0.02653891668687856f, -0.025921137416901205f,
                                        -0.025315658488928017f, -0.024722287093522224f,
                                        -0.024140832283733014f, -0.02357110497975884f, -0.023012917973166618f,
                                        -0.022466085930665017f, -0.02193042539743581f, -0.02140575480002204f,
                                        -0.02089189444877562f, -0.020388666539865083f, -0.01989589515684622f,
                                        -0.01941340627179629f, -0.01894102774601592f, -0.018478589330298494f,
                                        -0.018025922664772976f, -0.01758286127832f, -0.0171492405875663f,
                                        -0.016724897895459757f, -0.016309672389429833f, -0.01590340513913481f,
                                        -0.015505939093802901f, -0.015117119079167908f,
                                        -0.014736791794007281f, -0.014364805806283448f, -0.01400101154889612f,
                                        -0.013645261315048915f, -0.013297409253235066f,
                                        -0.012957311361848611f, -0.012624825483425112f,
                                        -0.012299811298518648f, -0.011982130319219f, -0.011671645882317208f,
                                        -0.011368223142122698f, -0.011071729062941104f,
                                        -0.010782032411215739f, -0.010499003747341413f,
                                        -0.010222515417156436f, -0.009952441543118588f,
                                        -0.009688658015172906f, -0.009431042481316784f, -0.00917947433787021f,
                                        -0.0089338347194582f, -0.008694006488710881f, -0.008459874225690195f,
                                        -0.00823132421704968f, -0.008008244444934212f, -0.007790524575626972f,
                                        -0.0075780559479516445f, -0.007370731561437289f,
                                        -0.007168446064251601f, -0.006971095740912477f,
                                        -0.0067785784997835795f, -0.006590793860362412f,
                                        -0.006407642940367109f, -0.006229028442631551f, -0.0060548546418145f,
                                        -0.005885027370931228f, -0.005719454007714197f,
                                        -0.005558043460812701f, -0.005400706155835296f,
                                        -0.0052473540212458186f, -0.005097900474119156f,
                                        -0.004952260405763161f, -0.004810350167216794f, -0.00467208755462841f,
                                        -0.004537391794524575f, -0.0044061835289748875f,
                                        -0.004278384800660735f, -0.004153919037854421f,
                                        -0.004032711039316586f, -0.0039146869591189255f,
                                        -0.003799774291397737f, -0.0036879018550472907f,
                                        -0.00357899977835823f, -0.0034729994836081675f,
                                        -0.0033698336716114466f, -0.003269436306233776f,
                                        -0.003171742598879449f, -0.003076688992956051f,
                                        -0.002984213148323894f, -0.002894253925736166f,
                                        -0.0028067513712752125f, -0.002721646700792128f,
                                        -0.0026388822843535944f, -0.0025584016307043183f,
                                        -0.0024801493717474085f, -0.0024040712470519976f,
                                        -0.0023301140883892845f, -0.0022582258043059183f,
                                        -0.0021883553647380678f, -0.0021204527856709225f,
                                        -0.0020544691138498013f, -0.0019903564115463204f,
                                        -0.0019280677413854022f, -0.0018675571512368374f,
                                        -0.001808779659175987f, -0.001751691238518606f,
                                        -0.001696248802932842f, -0.0016424101916329718f,
                                        -0.0015901341546587342f, -0.001539380338244843f,
                                        -0.0014901092702824428f, -0.0014422823458776603f,
                                        -0.0013958618130104727f, -0.0013508107582958294f,
                                        -0.0013070930928526972f, -0.0012646735382808602f,
                                        -0.001223517612751137f, -0.0011835916172105144f,
                                        -0.0011448626217048499f, -0.0011072984518214104f,
                                        -0.0010708676752557791f, -0.0010355395885012634f,
                                        -0.0010012842036679897f, -9.680722354292417E-4f,
                                        -9.358750881003099E-4f, -9.04664842849497E-4f, -8.744142450448508E-4f,
                                        -8.45096691735569E-4f, -8.166862192733915E-4f, -7.891574910712213E-4f,
                                        -7.624857855039164E-4f, -7.366469839492299E-4f,
                                        -7.116175589730185E-4f, -6.87374562656984E-4f, -6.638956150717976E-4f,
                                        -6.411588928954855E-4f, -6.191431181774308E-4f,
                                        -5.978275472500358E-4f, -5.771919597863434E-4f,
                                        -5.572166480064919E-4f, -5.378824060312395E-4f,
                                        -5.191705193840393E-4f, -5.010627546413901E-4f,
                                        -4.835413492314348E-4f, -4.665890013813508E-4f,
                                        -4.501888602125469E-4f, -4.3432451598458474E-4f,
                                        -4.189799904866546E-4f, -4.0413972757689405E-4f,
                                        -3.897885838686368E-4f, -3.7591181956435907E-4f,
                                        -3.6249508943522095E-4f, -3.4952443394611275E-4f,
                                        -3.369862705275772E-4f, -3.248673849899924E-4f,
                                        -3.131549230833022E-4f, -3.018363821988152E-4f,
                                        -2.9089960321360847E-4f, -2.803327624760808E-4f,
                                        -2.70124363931769E-4f, -2.6026323138844096E-4f,
                                        -2.5073850092026514E-4f, -2.41539613407869E-4f,
                                        -2.326563072162162E-4f, -2.2407861100646716E-4f,
                                        -2.1579683668177096E-4f, -2.0780157246594685E-4f,
                                        -2.0008367611390866E-4f, -1.9263426825147335E-4f,
                                        -1.8544472584442075E-4f, -1.7850667579512625E-4f,
                                        -1.7181198866531434E-4f, -1.6535277252293368E-4f,
                                        -1.591213669137134E-4f, -1.531103369531913E-4f,
                                        -1.4731246754056193E-4f, -1.4172075769014608E-4f,
                                        -1.363284149819503E-4f, -1.3112885012701617E-4f,
                                        -1.261156716480383E-4f, -1.2128268067273512E-4f,
                                        -1.1662386583912751E-4f, -1.1213339831032814E-4f,
                                        -1.0780562689800354E-4f, -1.0363507329267441E-4f,
                                        -9.961642739935609E-5f, -9.574454277737732E-5f,
                                        -9.201443218177506E-5f, -8.842126320533089E-5f,
                                        -8.496035402098382E-5f, -8.16271692199152E-5f, -7.841731574671066E-5f,
                                        -7.532653892911994E-5f, -7.235071859982686E-5f,
                                        -6.948586531019695E-5f, -6.672811663330771E-5f,
                                        -6.407373355578874E-5f, -6.151909695578013E-5f,
                                        -5.9060704165984325E-5f, -5.6695165620899494E-5f,
                                        -5.4419201585658216E-5f, -5.222963896567318E-5f,
                                        -5.012340819529349E-5f, -4.8097540204342756E-5f,
                                        -4.6149163460411725E-5f, -4.4275501085778867E-5f,
                                        -4.247386804861014E-5f, -4.074166842442656E-5f,
                                        -3.907639272926913E-5f, -3.747561532088459E-5f,
                                        -3.593699186858586E-5f, -3.445825688766823E-5f,
                                        -3.303722134059092E-5f, -3.1671770300362174E-5f,
                                        -3.0359860676451656E-5f, -2.909951900122292E-5f,
                                        -2.788883927721081E-5f, -2.672598088035111E-5f,
                                        -2.560916652259699E-5f, -2.453668026880836E-5f,
                                        -2.350686560812996E-5f, -2.2518123579741187E-5f,
                                        -2.1568910949530483E-5f, -2.0657738438022114E-5f,
                                        -1.9783168998662385E-5f, -1.8943816143463126E-5f,
                                        -1.813834231710844E-5f, -1.736545731730037E-5f,
                                        -1.662391675956331E-5f, -1.5912520586947966E-5f,
                                        -1.5230111622966187E-5f, -1.4575574165755278E-5f,
                                        -1.3947832623802113E-5f, -1.3345850192225171E-5f,
                                        -1.2768627566614463E-5f, -1.2215201696758563E-5f,
                                        -1.1684644575815688E-5f, -1.1176062066814266E-5f,
                                        -1.0688592763705555E-5f, -1.0221406887632749E-5f,
                                        -9.773705215195306E-6f, -9.344718041149523E-6f,
                                        -8.933704171103032E-6f, -8.539949946644469E-6f,
                                        -8.162768299132304E-6f, -7.801497834251181E-6f,
                                        -7.455501944004014E-6f, -7.124167946471975E-6f,
                                        -6.806906253563497E-6f, -6.503149563864878E-6f,
                                        -6.2123520818129654E-6f, -5.933988761079754E-6f,
                                        -5.667554572612334E-6f, -5.412563796217341E-6f,
                                        -5.168549334246021E-6f, -4.935062048267579E-6f,
                                        -4.711670116953939E-6f, -4.49795841439829E-6f, -4.293527909866223E-6f,
                                        -4.0979950864255025E-6f, -3.910991378787211E-6f,
                                        -3.732162630135854E-6f, -3.5611685668379045E-6f,
                                        -3.397682290806433E-6f, -3.241389788522361E-6f,
                                        -3.0919894569341305E-6f, -2.9491916452363494E-6f,
                                        -2.812718211972094E-6f, -2.682302098013776E-6f, -2.5576869129799E-6f,
                                        -2.438626536308783E-6f, -2.324884732656022E-6f,
                                        -2.2162347799502144E-6f, -2.1124591097737382E-6f,
                                        -2.013348961844829E-6f, -1.9187040491591347E-6f,
                                        -1.828332235455986E-6f, -1.7420492241211035E-6f,
                                        -1.6596782574154264E-6f, -1.5810498273622495E-6f,
                                        -1.5060013961831648E-6f, -1.4343771268378511E-6f,
                                        -1.3660276235566204E-6f, -1.300809681033395E-6f,
                                        -1.2385860433892849E-6f, -1.1792251712413714E-6f,
                                        -1.1226010180979076E-6f, -1.0685928136373873E-6f,
                                        -1.0170848558698558E-6f, -9.679663107371277E-7f,
                                        -9.211310190408596E-7f, -8.764773100323093E-7f,
                                        -8.339078229960246E-7f, -7.933293343849403E-7f,
                                        -7.546525917281053E-7f, -7.177921543110211E-7f,
                                        -6.826662388522075E-7f, -6.491965720633625E-7f,
                                        -6.173082477616256E-7f, -5.869295900882438E-7f,
                                        -5.579920218344231E-7f, -5.304299376523089E-7f,
                                        -5.041805817069912E-7f, -4.791839311017954E-7f,
                                        -4.553825829674186E-7f, -4.327216456589959E-7f,
                                        -4.111486355043759E-7f, -3.906133756619056E-7f,
                                        -3.7106790086247653E-7f, -3.524663642610666E-7f,
                                        -3.347649490623067E-7f, -3.1792178314371003E-7f,
                                        -3.018968571206471E-7f, -2.866519452979514E-7f,
                                        -2.866516130081049E-7f};


}
